Many service gateways such as firewalls and server load balancers provide Transmission Control Protocol (TCP) proxy functionality for some time. Typical service applications of TCP proxy include network analysis, security, and traffic adaptation due to asymmetric client and server condition. A TCP proxy server typically allocates an amount of memory buffer to handle the data packet buffering of a TCP proxy session between a client device and a server. The memory buffer is used to handle data packet buffers for client side session and server side session. The allocation of memory space among the client side session send and receive buffers, and server side session send and receive buffers does not often take performance into consideration. A TCP proxy server receives a data packet from the server side session, processes the data packet according to the necessary service applications, and transmits the resulting data packet to the client side session. In an ideal scenario, these steps are completed before the next data packet from the server side session is delivered to the TCP proxy server. However, in many deployed situations, client devices access services through mobile broadband access or residual Internet access where such access has a longer transmission time due to long distance wide area network and a slower transmission bandwidth based on subscriber access services. Nevertheless, the TCP proxy server and the servers reside in a same data center, and enjoy short transmission time and high capacity bandwidth. In such deployment scenarios, when the TCP proxy server receives a data packet from the server side session, the received data packet is placed in the server side session receive buffer, and waits for its turn to be processed by the service applications, which in turn waits for the client side session to free up client side session sending buffer, which is filled with pending data packets processed earlier, which in turn are waiting for their turn of transmission due to slow transmission of previously transmitted data packets.
In a typical situation, the TCP proxy server sends a TCP acknowledgement, according to the TCP protocol, upon successfully receiving appropriate amount of TCP data from the server. When the server receives the TCP acknowledgement of prior transmitted TCP data, the server would send additional TCP data packets to the TCP proxy server. The TCP proxy server would further increase memory space for the server side session receive buffer in order to store the additional TCP data packets, while waiting for the prior TCP data to be processed and sent to the client. The cascading effect causes the TCP proxy server to consume large amount of memory space for the server side session receive buffer necessary to hold the received TCP data packets of the server side session. The more buffer space is used, the less the memory resource becomes available for the TCP proxy server to handle additional TCP proxy sessions; despite the TCP proxy server may have other abundant resources to handle additional load.